wayland: Make sure window titles fit into a wl_buffer
authorTimm Bäder <mail@baedert.org>
Wed, 8 Jun 2016 05:31:45 +0000 (07:31 +0200)
committerTimm Bäder <mail@baedert.org>
Wed, 8 Jun 2016 13:06:51 +0000 (15:06 +0200)
commitd9a6517d5f9371648c625e75b3deb413f960c2f3
tree194416fe94852d19e41bd515e8fd3ea312a7b4c1
parent023f406c9617284ee3b88727df489f20cd066fd6
wayland: Make sure window titles fit into a wl_buffer

A wl_buffer has a max size of 4096 bytes, of which 8 are needed for the
header and another 4 for the string argument length (in this case), so
make sure the we only save the first 4083 bytes that are still valid
UTF8.

https://bugzilla.gnome.org/show_bug.cgi?id=767241
gdk/wayland/gdkwindow-wayland.c